package cn.com.yang.log;

import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.PrintStream;

/**
 * 
 * TODO
 * @author yangyijin
 * @since 2024年5月28日-上午11:55:16
 */
public class MyLogger {

	
	private static PrintStream ps=null;
	
	public static void info(String msg) {
		try {
			getFileOutStream();
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		}
		System.setOut(ps);
		System.out.println(msg);
	}
	
	private static void getFileOutStream() throws FileNotFoundException {
		FileOutputStream  out = new FileOutputStream("F:\\temp\\output_logger.txt");
		ps =  new PrintStream(out);
	}
}
